<?php
class collectionClass extends CApplicationComponent {

    function dateFormating($date) {
        list($day, $month, $year) = explode('/', $date);
		$date_f = $year."-".$month."-".$day;
        return $date_f;
    }
	
	function dateFormatingDef($date) {
        list($year, $month, $day) = explode('-', $date);
		// $date_f = $year."-".$month."-".$day;
		$date_f = $day."/".$month."/".$year;
        return $date_f;
    }
	
	function moneyFormat($number){
		$num = number_format($number, 0, ',', '.');
		return $num;
	}
	
	function decomMoney($number){
		return intval(str_replace(".","",$number));
	}
        
        function userAdmin($param){
		$user = SysUser::model()->findByPk($param)->username;
		return $user;
	}

}

?>